package com.codelinecounter.rule;

import java.util.LinkedList;
import java.util.List;

public abstract class CodeLineParser {
	protected String codeLine = "";
	protected CodeLineParserCreator.CodeLineParserClass parserType;
	protected int lineCount = 0;
	protected List<IParserStatusWatcher> parseStatusWatcherGroup = new LinkedList<IParserStatusWatcher>();
	
	public void setCodeLine(String codeLine){
		this.codeLine = codeLine.trim();
	}
	
	public abstract boolean parseCodeLine();
	
	public CodeLineParserCreator.CodeLineParserClass getParserType(){
		return this.parserType;
	}
	
	public int getCodeLineCount(){
		return this.lineCount;
	}
	
	public void addStatusWatcher(IParserStatusWatcher watcher){
		this.parseStatusWatcherGroup.add(watcher);
	}
}
